From: Florian Müllner Date: Fri, 31 Oct 2025 17:13:54 +0000 (+0100) Subject: extensions-app: Use one-shot idle/timeout functions X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~39^2~1^2~27 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6f62a116818d051c39aac61a6c59fbdf91aefeae;p=gnome-shell.git extensions-app: Use one-shot idle/timeout functions gjs now provides overrides for GLib's one-shot idle/timeout functions, so use them to save a bit of code and clearly indicate that a callback is only invoked once. Part-of: --- diff --git a/subprojects/extensions-app/js/extensionManager.js b/subprojects/extensions-app/js/extensionManager.js index 3150af364..7914aad20 100644 --- a/subprojects/extensions-app/js/extensionManager.js +++ b/subprojects/extensions-app/js/extensionManager.js @@ -412,12 +412,11 @@ export const ExtensionManager = GObject.registerClass({ if (this._updatesCheckId) return; - this._updatesCheckId = GLib.timeout_add_seconds( + this._updatesCheckId = GLib.timeout_add_seconds_once( GLib.PRIORITY_DEFAULT, 1, () => { this.notify('n-updates'); delete this._updatesCheckId; - return GLib.SOURCE_REMOVE; }); } });